#include<bits/stdc++.h>
#define int long long
#define rep(i,a,b) for(int i(a);i<=(b);++i)
#define req(i,a,b) for(int i(a);i>=(b);--i)
#define sort stable_sort
using namespace std;
char buf[1<<23],*p1=buf,*p2=buf,ubuf[1<<23],*u=ubuf;
#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++)
template<typename TP> inline TP read(TP &num)
{
	TP x=0;
	int f=0;
	char ch=getchar();
	while(ch<48||ch>57) f|=ch=='-',ch=getchar();
	while(48<=ch&&ch<=57) x=(x<<1)+(x<<3)+(ch^48),ch=getchar();
	return num=f?-x:x;
}
template<typename ...Args> inline void read(Args &...args)
{
	(read(args),...);
}
template<typename TP> inline void write(TP x)
{
	(x<0)?(putchar('-'),x=-x):0;
	(x>9)?(write(x/10),0):0;
	putchar((x%10)^48);
}
template<typename TP> inline void writeln(TP x)
{
	write<TP>(x);
	puts("");
}
int n,dis[200001],mini[200001];
struct Tangser
{
	int a,h;
} a[200001];
inline int ceil_div(int x,int y)
{
	return x/y+(x%y!=0);
}
signed main()
{
#ifndef ONLINE_JUDGE
	freopen("xinyue.in","r",stdin);
	freopen("xinyue.out","w",stdout);
#endif
	read(n,a[0].a);
	rep(i,1,n) read(a[i].a,a[i].h);
	sort(a+1,a+n+1,[](Tangser x,Tangser y){return x.a<y.a;});
	rep(i,1,n)
	{
		mini[i]=(ceil_div(a[i].h,a[n].a)-1)*a[i].a;
		dis[i]=(ceil_div(a[i].h,a[0].a)-1)*a[i].a-mini[i];
	}
	rep(i,1,n) rep(j,i+1,n)
	{
		int val=(ceil_div(a[j].h,a[i].a)-1)*a[j].a-mini[j];
		if(dis[i]+val<dis[j]) dis[j]=dis[i]+val;
		else break;
	}
	writeln(dis[n]+accumulate(mini+1,mini+n+1,0ll));
	return 0;
}
